graphics = {}
function graphics.ScrW()
	return love.graphics.getWidth()
end

function graphics.ScrH()
	return love.graphics.getHeight()
end

function graphics.loadImage(src)
	return love.graphics.newImage(CurrentDirectory..src)
end

function graphics.drawPart(image, x,y, w,h, sx,sy, sw,sh)
	local width,height = image:getWidth(),image:getHeight()
	local quad = love.graphics.newQuad(sx,sy,sw,sh, width,height)
	love.graphics.drawq(image, quad, x,y, 0, w/sw,h/sh, 0,0)
end

function graphics.setColor(r,g,b,a)
	love.graphics.setColor(r,g,b, a)
end

function graphics.drawRect(x,y,w,h, fill)
	fill = fill or false
	local fillStyle = fill and 'fill' or 'line'
	love.graphics.rectangle(fillStyle, x,y,w,h)
end

function graphics.drawText(str, x,y)
	love.graphics.print(str,x,y)
end